import request from '@/utils/request'

/**
 *  获取商品数据列表
 */
export function goodsList(params) {
  return request({
    url: '/goods',
    params
  })
}

/**
 * 商品id
 * @returns
 */
export function deleteGoods(id) {
  return request({
    url: '/goods/' + id,
    method: 'DELETE'
  })
}

/**
 *  添加商品
 * @param {Object} data
 */
export function addGoods(data) {
  return request({
    url: '/goods',
    method: 'POST',
    data
  })
}
